import { IRouterConfig, lazy } from 'ice';
import BasicLayout from './Layouts/BasicLayout';

const Home = lazy(() => import('@/pages/Home'));
const Page1 = lazy(() => import('@/pages/Page1'));

const routerConfig: IRouterConfig[] = [
  {
    path: '/main',
    component: BasicLayout,
    children: [
      {
        path: '/page1',
        component: Page1
      },
      {
        path: '/',
        exact: true,
        component: Home
      }
    ]
  },
  {
    path: '/home',
    component: Home,
  },
  {
    path: '/',
    redirect: '/main',
  }
];

export default routerConfig;
